package ie.dcu.spca.model.sql;

public class itemSQL {
    // public static String selectItemById = "";

    public static String selectItemListByBillid = "SELECT * FROM item WHERE bill_id=%d AND delete_at==0 ORDER BY create_at DESC";

    public static String insertItem = "INSERT INTO item VALUES(?,?,?,?,?,?,?);";

    public static String selectById = "SELECT * FROM item WHERE id=%d";

    public static String insertByBean = "INSERT INTO item VALUES(?,?,?,?,?,?,?);";

    public static String deleteById = "UPDATE item SET delete_at=? WHERE id=?";

    public static String deleteByBean = "";

    public static String updateByBean = "UPDATE item SET count=?,bill_id=?,product_id=?,create_at=?,update_at=?,delete_at=? WHERE id=?;";

    public static String selectMaxId = "SELECT MAX(id) as max FROM item;";

    public static String existById = "SELECT * FROM item WHERE id=%d;";

    public static String isDeletedById = "SELECT * FROM item WHERE id=%d AND delete_at==0;";

    public static String selectAllBean = "SELECT * FROM item WHERE delete_at==0;";
}
